Position encoders are used in many different systems to sense the position of different parts, subsystems, etc. One such system is a large format printer where several encoders are typically used to sense paper position, carriage position, etc.
A common encoder is based on optical technology and comprises a codewheel 10a in the case of a rotary encoder, FIG. 1, or a codestrip 10b in the case of a linear encoder, FIG. 2. Generally, each codewheel or codestrip (herein collectively referred to as “code members”) contains marks 12 which are optically distinct either in terms of reflectance or transmissivity from their background. The wheel or strip moves past an optical sensor 14 which picks up reflected or transmitted light from a light source (not shown) modulated by the marks moving across the sensor's field of view. In FIG. 1 the sensor comprises two individual elements, whereas in FIG. 2 the sensor comprises two series of interleaved elements. In both cases, the light incident on the sensors causes the sensors to produce two oscillating quadrature (i.e. 90° out of phase) voltage signals A=(A1–A2) and B=(B1–B2) from which it is possible to derive positional information.
In digital encoders, the sequence of marks in the code member are sensed to generate analog quadrature signals which are digitised, typically by being fed through respective Schmidt triggers. The edges of the digital signals are then used to derive the position information. The resolution of the encoder is dictated by the number of the codestrip marks over a given distance travelled (linear encoders) or over a given angle (rotary encoders).
Analog encoders generate, for example, sinusoidal or rounded edge triangular signals—the shape of the waveform being determined by the shape of the optical sensors and the encoded marks. Examples of such encoders are produced by Agilent under the product numbers QEDS 9852/9855 and QEDS 9862/9863.
Certain distinguishable instants in the two sensor signals that are used to obtain the digital signals in digital encoders are still needed in analog encoders to derive the position information. They can be the zero crossing points of the analog signals or the points where the amplitude of the two signals is the same. The main advantage of the analog encoders is that it is possible to increase the system resolution over that of a digital encoder using the same code member. These techniques involve the calculation of the phase angle of the signal so that the position between two digital edges can be calculated.
The most common technique for encoders whose sensors have a sinusoidal output is shown in FIG. 3. Signals A and B are the analog encoder outputs as described above, voltage shifted to oscillate about zero volts, while DIG A and DIG B represent digital signals derived from the instants when the signals A and B respectively cross the zero line. The quadrature digital signals DIG A and DIG B feed a digital counter (CTR) that provides a coarse measure of position, and is used to compute direction of movement and displacement to “digital” accuracy. To provide a fine measure of position at an arbitrary instant T, the amplitudes of signals A and B at the instant T are measured and, since the shape of the curves A and B is known, the associated electrical angle or phase displacement (PHASE) from the last crossing point is computed from them. The combination of the counter value and the phase displacement provides fine position resolution.
However, the mathematics required involves the calculation of trigonometric functions and is usually performed in some type of processor (generic CPU or a DSP (digital signal processor)). An advantage of such encoders is that by determining phase displacement, the encoders can be made independent of the amplitude of the quadrature signals A and B. This means that even if the code member or sensors degrade over time, the phase relationship of the quadrature signals should still be retained and correct measurements should still be made.
For encoders with triangular output signals having rounded maxima and minima, the above technique cannot be applied without a degradation of resolution so the amplitude of one of the sensor output signals is used instead to determine phase angle. This type of encoder is specially applicable to low cost systems because of the lower costs of the sensor itself and the associated electronics (it requires a single measurement instead of the two synchronous measurements required to measure the A and B amplitudes in the case of sinusoidal outputs, as well as reduced computations).
FIG. 4 is an example of the operation of such an encoder. Signals A and B (voltage shifted to oscillate about zero volts) are the sensor outputs, and are essentially triangular signals with rounded maxima and minima; the segments enclosed between the lines labelled LOW and HIGH are straight lines and the rounded maxima and minima, as well as the straight line segments, each occupy ¼ of the signal period. In each cycle of the signals, the instants t0 and t2 where the amplitude of the two signals are equal (A=B) and the instants t1 and t3 where the amplitude of one signal is equal to the inverse of the amplitude of the other (A=−B), as indicated on FIG. 4, are the distinguishable instants used to derive the digital signals DIG A and DIG B used to feed the digital counter (CTR). This, as before, provides a coarse measure of position. To obtain higher resolution position information, the instantaneous amplitude of one of the analog signals at the arbitrary measurement instant T is measured, the particular signal chosen being that which has a straight line in the relevant quadrant. Thus, in the example of FIG. 4, the amplitude of signal B is measured at point P while the encoder counter contains the “n+1” value. This value is scaled to the difference between the LOW and HIGH levels to obtain the instantaneous value of Signal B as a proportion of the difference between the LOW and HIGH levels, which is used to derive the fine position information.
As mentioned, the particular signal (A or B) whose instantaneous amplitude value is measured to determine the fine position depends upon the particular quarter cycle in which the measurement instant T lies, since the chosen signal is that having a straight line in the relevant quadrant. Thus, signal A would be used for counter values n, n+2, etc. while signal B would be used for counter values n+1, n+3, etc. In fact if an inverse signal is available, then A can be used for n=1, not B for n+1, not A for n+2 and B for n+3, so providing linearly increasing monotonic values ranging from low to high during each quarter cycle. These values can be combined with the counter value indicating the specific quarter cycle to give a continuously increasing value across the full range of the encoder.
This technique tends to fail when the amplitude of the encoder signals is not constant. This is not an uncommon situation and several factors contribute to this behaviour:                Different amplitude ranges of the signals A and B in the two encoder channels.        Mechanical errors in the codewheel, for example, eccentricity, warp.        Degradation of the codewheel through, for example, the application of aerosol cleaning products.        
In real conditions, the values of the HIGH and LOW threshold levels, which define the upper and lower limits of the straight line portions of the signals A and B, cannot be represented as parallel straight lines. They change with the sensor position and possibly over time, making it difficult to accurately compute the fine position using the above technique. Their variation limits the maximum number of quantization levels (steps) the measurement system can use without introducing errors, thus reducing the effective resolution and/or inducing position errors. The position errors negatively affect the system and, for instance, in a printer can appear as defects in image quality.
Different calibration techniques are used to compensate for these defects. The most common one consists of calibrating the encoder subsystem section by section. The value of the HIGH and LOW levels is measured at different positions of the sensor (different angles on a rotary encoder or different positions on a linear one) and an interpolation technique is used to calculate intermediate points. The calibration must be repeated from time to time to compensate for time-related degradations (aerosol, encoder sensor, etc.), which is time consuming. In many cases, the calibration can only be run at low speeds, so it is not fully representative of when the system operates at higher speeds.
It is an object of the invention to provide a position-measuring circuit for use with an analog position encoder which can provide improved resolution and simplified calibration procedures.